package com.example.chandao;

import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;

import java.net.InetAddress;

@Slf4j
@EnableAsync
@SpringBootApplication
public class ChanDaoApplication {

    @SneakyThrows
    public static void main(String[] args) {
        ConfigurableApplicationContext application = SpringApplication.run(ChanDaoApplication.class, args);
        String serverPort = application.getEnvironment().getProperty("server.port");
        log.info("ChanDaoApplication 启动成功 ~~~~ 接口文档链接：http://{}:{}/chandao/doc.html ...", InetAddress.getLocalHost().getHostAddress(), serverPort);
    }

}
